package close.mazegame.entity.mob.behaviour;

import java.awt.Point;

import close.mazegame.entity.mob.AITank;

public class FollowBehaviour extends TargetBehaviour {

	public FollowBehaviour(AITank mob) {
		super(mob);
	}

	@Override
	public void setTarget() {
		Point pos = new Point((int)(mob.getX()), ((int)mob.getY()));
		target = mob.getPathfinder().getNearer(pos, true);
	}
	
	@Override
	public float getTargetTurrentAngle() {
		return mob.getLevel().getPlayerPosition().sub(mob.getPosition()).angle(); //Not pretty I know
	}

}
